package com.pe.service.param.user;

import java.util.Map;

import com.pe.service.param.IServiceParam;

public class RegisterServiceParam implements IServiceParam {

	private String password;
	private String email;
	private String lastName;
	private String firstName;

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Override
	public void parseServiceParam(String jsonString) {
		// TODO Auto-generated method stub

	}

	@Override
	public void parseServiceParam(Map<String, String[]> serviceParams) {
		for(String reqParam : serviceParams.keySet()){
			if(reqParam.equalsIgnoreCase("fn")){
				firstName=serviceParams.get(reqParam)[0];
				setFirstName(firstName);
			}else if(reqParam.equalsIgnoreCase("ln")){
				lastName=serviceParams.get(reqParam)[0];
				setLastName(lastName);
			}else if(reqParam.equalsIgnoreCase("pass")){
				password=serviceParams.get(reqParam)[0];
				setPassword(password);
			}else if(reqParam.equalsIgnoreCase("email")){
				email=serviceParams.get(reqParam)[0];
				setEmail(email);
			}
		}

	}
}
